package com.zhkj.txg.module.order.entity

import com.chad.library.adapter.base.entity.node.BaseNode
import com.google.gson.annotations.SerializedName
import com.zhkj.lib.http.BaseResponse

data class OrderDetailResponse(
    val data: OrderDetailEntity? = null
) : BaseResponse()

data class OrderDetailEntity(
    val id: Long,
    @SerializedName("order_sn")
    val orderSignNumber: String = "",
    val consignee: String = "",
    val mobile: String = "",
    @SerializedName("full_address")
    val fullAddress: String = "",
    @SerializedName("pay_name")
    val payName: String = "",
    @SerializedName("goods_price")
    val goodsPrice: String = "",
    @SerializedName("shipping_price")
    val shippingPrice: String = "",
    @SerializedName("coupon_price")
    val couponPrice: String = "",
    @SerializedName("order_amount")
    val orderAmount: String = "",
    @SerializedName("total_amount")
    val totalAmount: String = "",
    @SerializedName("createtime")
    val createTime: String = "",
    @SerializedName("confirm_time")
    val confirmTime: String = "",
    @SerializedName("pay_time")
    val payTime: String = "",
    @SerializedName("user_note")
    val userNote: String = "",
    @SerializedName("order_goods")
    val orderGoods: MutableList<OrderListGoodsEntity> = mutableListOf(),
    val shops: OrderDetailUIShopEntity? = null,
    @SerializedName("shipping_code")
    val shippingCode: String = "",
    @SerializedName("shipping_name")
    val shippingName: String = "",
    @SerializedName("shipping_no")
    val shippingNumber: String = "",
    @SerializedName("order_status")
    val orderStatus: String = "",
    @SerializedName("shipping_status")
    val shippingStatus: String = "",
    @SerializedName("pay_status")
    val payStatus: String = "",
    val share_url: String = "",
    var status: Int? = 0,    //拼团状态  0单买 10拼单中 20拼单成功 30拼单失败
    val progress: ProgressEntity? = null,    //拼团进度
    @SerializedName("order_info")
    val orderInfo: MutableList<String> = mutableListOf()
)

data class ProgressEntity(
    val people: String = "",
    val actual_people: String = "",
    var end_time: Long = 0,
    val status: Int? = 0   //拼团状态  0单买 10拼单中 20拼单成功 30拼单失败
) : BaseNode() {
    override val childNode: MutableList<BaseNode>? = null
}

data class OrderDetailStatusEntity(
    val drawableResId: Int = 0,
    val name: String = "",
    var showRefundButton: Boolean = false,
    val status: Int = -1
) : BaseNode() {
    override val childNode: MutableList<BaseNode>? = null
}